package com.ruoyi.extend.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.ChannelUnionResultInfoMapper;
import com.ruoyi.db.domain.ChannelUnionResultInfo;
import com.ruoyi.extend.service.IChannelUnionResultInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 渠道联登结果信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-08
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class ChannelUnionResultInfoServiceImpl implements IChannelUnionResultInfoService 
{
    @Autowired
    private ChannelUnionResultInfoMapper channelUnionResultInfoMapper;

    /**
     * 查询渠道联登结果信息
     * 
     * @param id 渠道联登结果信息主键
     * @return 渠道联登结果信息
     */
    @Override
    public ChannelUnionResultInfo selectChannelUnionResultInfoById(Long id)
    {
        return channelUnionResultInfoMapper.selectChannelUnionResultInfoById(id);
    }

    /**
     * 查询渠道联登结果信息列表
     * 
     * @param channelUnionResultInfo 渠道联登结果信息
     * @return 渠道联登结果信息
     */
    @Override
    public List<ChannelUnionResultInfo> selectChannelUnionResultInfoList(ChannelUnionResultInfo channelUnionResultInfo)
    {
        return channelUnionResultInfoMapper.selectChannelUnionResultInfoList(channelUnionResultInfo);
    }

    /**
     * 查询渠道联登结果信息列表
     *
     * @param channelUnionResultInfo 渠道联登结果信息
     * @return 渠道联登结果信息
     */
    @Override
    public List<Map<String, Object>> selectChannelUnionResultInfoListMap(ChannelUnionResultInfo channelUnionResultInfo)
    {
        return channelUnionResultInfoMapper.selectChannelUnionResultInfoListMap(channelUnionResultInfo);
    }

    /**
     * 新增渠道联登结果信息
     * 
     * @param channelUnionResultInfo 渠道联登结果信息
     * @return 结果
     */
    @Override
    public int insertChannelUnionResultInfo(ChannelUnionResultInfo channelUnionResultInfo)
    {
        channelUnionResultInfo.setCreateTime(DateUtils.getNowDate());
        return channelUnionResultInfoMapper.insertChannelUnionResultInfo(channelUnionResultInfo);
    }

    /**
     * 修改渠道联登结果信息
     * 
     * @param channelUnionResultInfo 渠道联登结果信息
     * @return 结果
     */
    @Override
    public int updateChannelUnionResultInfo(ChannelUnionResultInfo channelUnionResultInfo)
    {
        channelUnionResultInfo.setUpdateTime(DateUtils.getNowDate());
        return channelUnionResultInfoMapper.updateChannelUnionResultInfo(channelUnionResultInfo);
    }

    /**
     * 批量删除渠道联登结果信息
     * 
     * @param ids 需要删除的渠道联登结果信息主键
     * @return 结果
     */
    @Override
    public int deleteChannelUnionResultInfoByIds(String ids)
    {
        return channelUnionResultInfoMapper.deleteChannelUnionResultInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除渠道联登结果信息信息
     * 
     * @param id 渠道联登结果信息主键
     * @return 结果
     */
    @Override
    public int deleteChannelUnionResultInfoById(Long id)
    {
        return channelUnionResultInfoMapper.deleteChannelUnionResultInfoById(id);
    }
}
